[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
CSeg : Integer           Returns Address of Code Segment

 CSeg : Integer;

    Returns the address of the current code segment--that is, the contents
    of the CS register. This is a 16-bit value that gives the paragraph
    (16-bytes) address upon which the code segment starts.

          Notes:    If the value returned is less than 0, the actual value
                    of the CS register is equal to 65536.0 + CSeg.

                    To get the actual starting byte address, multiply by
                    16.0 and assign the result to a real variable (to
                    avoid overflow).

  -------------------------------- Example ---------------------------------

           var
             CSByteAddr : Real;

           { Compute the CS starting byte address }
           if CSeg < 0 then
             CSByteAddr := 16.0 * (65536.0 + CSeg)
           else
             CSByteAddr := 16.0 * CSeg;

See Also: DSeg SSeg absolute
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson